package com.xbongbong.paas.service;

import com.xbongbong.paas.domain.entity.PaasFormDataEntity;
import com.xbongbong.paas.elasticsearch.pojo.dto.SearchDataInConditionDTO;
import com.xbongbong.paas.elasticsearch.pojo.vo.FormDataRepeatBatchVO;
import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.paas.pojo.dto.ApprovePrintSubSummaryGetDTO;
import com.xbongbong.paas.pojo.dto.ButtonGetDTO;
import com.xbongbong.paas.pojo.dto.DeleteFormDataByBusinessRuleDTO;
import com.xbongbong.paas.pojo.dto.FormCountGetDTO;
import com.xbongbong.paas.pojo.dto.FormDataAddDTO;
import com.xbongbong.paas.pojo.dto.FormDataAddGetDTO;
import com.xbongbong.paas.pojo.dto.FormDataDeleteDTO;
import com.xbongbong.paas.pojo.dto.FormDataFastAddGetDTO;
import com.xbongbong.paas.pojo.dto.FormDataFastUpdateDTO;
import com.xbongbong.paas.pojo.dto.FormDataGetDTO;
import com.xbongbong.paas.pojo.dto.FormDataListDTO;
import com.xbongbong.paas.pojo.dto.FormDataOwnerDTO;
import com.xbongbong.paas.pojo.dto.FormDataRepeatDTO;
import com.xbongbong.paas.pojo.dto.FormDataRestoreDTO;
import com.xbongbong.paas.pojo.dto.FormDataSubSummaryGetDTO;
import com.xbongbong.paas.pojo.dto.FormDataSummaryDTO;
import com.xbongbong.paas.pojo.dto.FormDataUpdateDTO;
import com.xbongbong.paas.pojo.dto.FormDataUpdateGetDTO;
import com.xbongbong.paas.pojo.dto.FormPreviewGetDTO;
import com.xbongbong.paas.pojo.dto.LinkFormDataDTO;
import com.xbongbong.paas.pojo.dto.LinkRelyDataDTO;
import com.xbongbong.paas.pojo.dto.LinkWorkOrderPhoneDTO;
import com.xbongbong.paas.pojo.dto.ProcessDataAddFormDataDTO;
import com.xbongbong.paas.pojo.dto.ProcessDataUpdateFormDataDTO;
import com.xbongbong.paas.pojo.dto.SaasFormSaveDTO;
import com.xbongbong.paas.pojo.dto.ValidateDataDTO;
import com.xbongbong.paas.pojo.dto.WarehouseCheckDTO;
import com.xbongbong.paas.pojo.vo.ButtonGetVO;
import com.xbongbong.paas.pojo.vo.CheckRepeatVO;
import com.xbongbong.paas.pojo.vo.CustomerMergeVO;
import com.xbongbong.paas.pojo.vo.DeleteFormDataByBusinessRuleVO;
import com.xbongbong.paas.pojo.vo.DistributorAddressVo;
import com.xbongbong.paas.pojo.vo.DistributorReceiverVo;
import com.xbongbong.paas.pojo.vo.FormCountGetVO;
import com.xbongbong.paas.pojo.vo.FormDataAddGetVO;
import com.xbongbong.paas.pojo.vo.FormDataAddVO;
import com.xbongbong.paas.pojo.vo.FormDataDeleteVO;
import com.xbongbong.paas.pojo.vo.FormDataFastUpdateVO;
import com.xbongbong.paas.pojo.vo.FormDataGetVO;
import com.xbongbong.paas.pojo.vo.FormDataListVO;
import com.xbongbong.paas.pojo.vo.FormDataOwnerVO;
import com.xbongbong.paas.pojo.vo.FormDataRepeatVO;
import com.xbongbong.paas.pojo.vo.FormDataRestoreVO;
import com.xbongbong.paas.pojo.vo.FormDataSummaryVO;
import com.xbongbong.paas.pojo.vo.FormDataUpdateGetVO;
import com.xbongbong.paas.pojo.vo.FormDataUpdateVO;
import com.xbongbong.paas.pojo.vo.LinkDataDefaultVO;
import com.xbongbong.paas.pojo.vo.LinkFormDataVO;
import com.xbongbong.paas.pojo.vo.LinkRelyDataVO;
import com.xbongbong.paas.pojo.vo.LinkRelyDataWorkOrderPhoneVO;
import com.xbongbong.paas.pojo.vo.PaasFormDataEsListVO;
import com.xbongbong.paas.pojo.vo.ProcessDataAddFormDataVO;
import com.xbongbong.paas.pojo.vo.ProcessDataUpdateFormDataVO;
import com.xbongbong.paas.pojo.vo.SearchDataInConditionVO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.BaseVO;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import com.xbongbong.pro.businessdata.pojo.dto.BusinessDataDTO;
import com.xbongbong.pro.businessdata.pojo.dto.BussinessCustomerListRelyDTO;
import com.xbongbong.pro.businessdata.pojo.dto.DistributorAddressDTO;
import com.xbongbong.pro.businessdata.pojo.dto.DistributorReceiverDTO;
import com.xbongbong.pro.businessdata.pojo.dto.ProductListDataDTO;
import com.xbongbong.pro.businessdata.pojo.vo.BusinessCustomerListRelyVO;
import com.xbongbong.pro.decisiontree.pojo.dto.ContactSearchListDTO;
import com.xbongbong.pro.defaultData.pojo.dto.DefaultDataDTO;
import com.xbongbong.pro.defaultData.pojo.vo.DefaultDataVO;
import com.xbongbong.pro.detailtab.dto.OrderOnPinDTO;
import com.xbongbong.pro.form.pojo.dto.EsDataDTO;
import com.xbongbong.pro.formdata.pojo.AfterSavePojo;
import com.xbongbong.pro.formdata.pojo.dto.CheckDateDTO;
import com.xbongbong.pro.formdata.pojo.dto.DefaultOwnerAndCoUserGetDTO;
import com.xbongbong.pro.formdata.pojo.dto.FormDataDetailDTO;
import com.xbongbong.pro.formdata.pojo.dto.FormDataRepeatBatchDTO;
import com.xbongbong.pro.formdata.pojo.dto.InheritRuleDTO;
import com.xbongbong.pro.formdata.pojo.dto.MobileFormDataDetailDTO;
import com.xbongbong.pro.formdata.pojo.vo.CheckDateVO;
import com.xbongbong.pro.formdata.pojo.vo.DefaultOwnerAndCoUserGetVO;
import com.xbongbong.pro.formdata.pojo.vo.FormDataDetailVO;
import com.xbongbong.pro.formdata.pojo.vo.InheritRuleVO;
import com.xbongbong.pro.formdata.pojo.vo.MobileFormCommonDetailVO;
import com.xbongbong.pro.formdata.pojo.vo.MobileFormDataDetailVO;
import com.xbongbong.pro.fundtransfer.pojo.dto.CheckTransferDateDTO;
import com.xbongbong.pro.fundtransfer.pojo.vo.CheckTransferDateVO;
import com.xbongbong.pro.formexplain.pojo.vo.HandlerExplainVO;
import com.xbongbong.pro.listbatch.pojo.dto.HandoverDTO;
import com.xbongbong.pro.payment.pojo.dto.PaymentWriteOffDTO;
import com.xbongbong.pro.payment.pojo.vo.PaymentWriteOffVO;
import com.xbongbong.pro.warehouse.pojo.vo.WarehouseListVO;
import com.xbongbong.pro.weblist.pojo.dto.CustomerRepeatDTO;
import com.xbongbong.pro.weblist.pojo.dto.DataInfoDTO;
import com.xbongbong.pro.weblist.pojo.dto.RepeatToolFieldGetDTO;
import com.xbongbong.pro.weblist.pojo.vo.CustomerRepeatVO;
import com.xbongbong.pro.weblist.pojo.vo.DataInfoVO;
import com.xbongbong.pro.weblist.pojo.vo.RecheckRepeatVO;
import com.xbongbong.pro.weblist.pojo.vo.RepeatFieldListVO;
import com.xbongbong.pro.weblist.pojo.vo.WaitPurchaseConfiglVO;
import com.xbongbong.pro.weblist.pojo.vo.WaitPurchaseDetailVO;
import com.xbongbong.saas.domain.entity.PurchaseProductEntity;
import com.xbongbong.saas.enums.XbbRefTypeEnum;

import java.util.List;
import java.util.Map;


/**
 * @author: wufeng
 * @date: 2018/8/27 20:10
 * @desrcption:
 */
public interface PaasFormDataService {

    /**
     * 查询应用下的某个表单数据列表
     * @param formDataListDTO
     * @return 应用下的某个表单数据列表
     * @throws XbbException
     */
    FormDataListVO list(FormDataListDTO formDataListDTO) throws XbbException;

    /**
     * es查询应用下的某个表单数据列表
     * @param formDataListDTO
     * @return 应用下的某个表单数据列表
     * @throws XbbException
     */
    PaasFormDataEsListVO listByEs(FormDataListDTO formDataListDTO) throws XbbException;

    PaasFormDataEsListVO listByCloudCode(FormDataListDTO formDataListDTO) throws XbbException;

    /**
     * 数据汇总
     * @param formDataSummaryDTO
     * @return
     * @throws XbbException
     */
    FormDataSummaryVO getFormDataSummary(FormDataSummaryDTO formDataSummaryDTO) throws XbbException;

    /**
     * 数据汇总
     * @param formDataSubSummaryGetDTO
     * @return
     * @throws XbbException
     */
    FormDataSummaryVO getFormDataSubSummary( FormDataSubSummaryGetDTO formDataSubSummaryGetDTO) throws XbbException;

    /**
     * 审批打印数据汇总
     * @param
     * @return
     * @throws XbbException
     */
    FormDataSummaryVO getFormDataPrintSubSummary( ApprovePrintSubSummaryGetDTO approvePrintSubSummaryGetDTO) throws XbbException;

    /**
     * 获取数据详情
     * @param formDataGetDTO
     * @return FormDataGetVO
     * @throws XbbException
     */
    FormDataGetVO get(FormDataGetDTO formDataGetDTO) throws XbbException;

    /**
     * 移动端detail
     * @param formDataGetDTO
     * @return MobileFormCommonDetailVO
     * @throws XbbException
     */
    MobileFormCommonDetailVO getMoblieDetail(FormDataGetDTO formDataGetDTO) throws XbbException;

    /**
     * 删除数据
     * @param formDataDeleteDTO
     * @return FormDataDeleteVO
     * @throws XbbException
     */
    FormDataDeleteVO delete(FormDataDeleteDTO formDataDeleteDTO) throws XbbException;

    /**
     * 保存数据
     * @param formDataSaveDTO
     * @return FormDataAddVO
     * @throws XbbException
     */
    FormDataAddVO add(FormDataAddDTO formDataSaveDTO) throws XbbException;

    /**
     * 保存数据只做判重
     *
     * @param formDataSaveDTO
     * @return
     * @throws XbbException
     */
    FormDataAddVO addByOnlyRepeatValidate(FormDataAddDTO formDataSaveDTO) throws XbbException;

    /**
     * 更新表单数据
     * @param formDataUpdateDTO
     * @return
     * @throws XbbException
     */
    FormDataUpdateVO update(FormDataUpdateDTO formDataUpdateDTO) throws XbbException;
    /**
     * 更改负责人
     * @param formDataOwnerDTO
     * @return
     * @throws XbbException
     */
    FormDataOwnerVO updateOwner(FormDataOwnerDTO formDataOwnerDTO) throws XbbException;

    /**
     * 在新建时，返回初始化字段属性和数据（流水号等）
     * @param formDataAddGetDTO
     * @return
     * @throws XbbException
     */
    FormDataAddGetVO addGet(FormDataAddGetDTO formDataAddGetDTO) throws XbbException;

    /**
     * 新建/关联新建的时候处理关联数据、关联数据多选的默认值
     * @param explainList
     * @param formDataAddGetDTO
     * @param handlerExplainVO
     * @return
     * @throws XbbException
     */
    LinkDataDefaultVO addGetLinkDataDefault(List<FieldAttrEntity> explainList, FormDataAddGetDTO formDataAddGetDTO, HandlerExplainVO handlerExplainVO) throws XbbException;

    /**
     * 快捷新建表单数据（需要返回表单字段描述，查重快速新建）
     * @param formDataFastAddGetDTO
     * @return
     * @throws XbbException
     */
    FormDataAddGetVO fastAddGet(FormDataFastAddGetDTO formDataFastAddGetDTO) throws XbbException;

    /**
     * 在更新时，返回标签字段属性和属性，权限等相关信息
     * @param formDataUpdateGetDTO
     * @return
     * @throws XbbException
     */
    FormDataUpdateGetVO updateGet(FormDataUpdateGetDTO formDataUpdateGetDTO) throws XbbException;

    /**
     * 在更新时，返回标签字段属性和属性，权限等相关信息
     * @param buttonGetDTO
     * @return
     * @throws XbbException
     */
    ButtonGetVO buttonGet(ButtonGetDTO buttonGetDTO) throws XbbException;

    /**
     * 返回总记录数
     * @param formCountGetDTO
     * @return 返回总记录
     * @throws XbbException
     */
    FormCountGetVO count(FormCountGetDTO formCountGetDTO) throws XbbException;

    /**
     * 流程流转条件根据字段检索数据
     * @param searchDataInConditionDTO
     * @return
     * @throws XbbException
     */
    SearchDataInConditionVO searchDataInProcessCondition(SearchDataInConditionDTO searchDataInConditionDTO) throws XbbException;

    /**
     * 联动其他表单获取数据
     * @param linkFormDataDTO
     * @return
     * @throws XbbException
     */
    LinkFormDataVO linkFormData(LinkFormDataDTO linkFormDataDTO) throws XbbException;

    /**
     * 下拉框-选项-数据联动
     * @param linkRelyDataDTO
     * @return
     * @throws XbbException
     */
    LinkRelyDataVO linkRelyData(LinkRelyDataDTO linkRelyDataDTO) throws XbbException;

    /**
     * 工单联动客户与联系人电话
     * @param linkWorkOrderPhoneDTO
     * @return
     * @throws XbbException
     */
    LinkRelyDataWorkOrderPhoneVO linkWorkOrderPhone(LinkWorkOrderPhoneDTO linkWorkOrderPhoneDTO) throws XbbException;

    /**
     * 快速编辑
     * @param formDataFastUpdateDTO
     * @return
     * @throws XbbException
     */
    FormDataFastUpdateVO fastUpdate(FormDataFastUpdateDTO formDataFastUpdateDTO) throws XbbException;

    /**
     * 数据还原
     * @param formDataRestoreDTO
     * @return
     * @throws XbbException
     */
    FormDataRestoreVO restore(FormDataRestoreDTO formDataRestoreDTO) throws XbbException;


    /**
     * 查询重复值
     * @description
     * @param formDataRepeatDTO
     * @return
     * @throws XbbException
     */
    CheckRepeatVO repeat(FormDataRepeatDTO formDataRepeatDTO) throws XbbException;

    /**
     * 查询重复值
     * @description
     * @param formDataRepeatDTO
     * @return
     * @throws XbbException
     */
    FormDataRepeatVO repeat(FormDataRepeatDTO formDataRepeatDTO,Map<String,Object> repeatValueMap) throws XbbException;


    /**
     * 批量查询重复值
     * @param formDataRepeatBatchDTO
     * @return
     * @throws XbbException
     */
    FormDataRepeatBatchVO repeatBatch(FormDataRepeatBatchDTO formDataRepeatBatchDTO) throws XbbException;

    /**
     * 将流程数据插入到表单数据
     * @param processDataAddFormDataDTO
     * @return
     * @throws XbbException
     */
    ProcessDataAddFormDataVO  processDataAddFormData(ProcessDataAddFormDataDTO processDataAddFormDataDTO) throws XbbException;

    /**
     * 将流程数据更新到表单数据
     * @param processDataUpdateFormDataDTO 对象
     * @return 返回更新数据的id
     * @throws XbbException 抛出业务异常
     */
    ProcessDataUpdateFormDataVO processDataUpdateFormData(ProcessDataUpdateFormDataDTO processDataUpdateFormDataDTO) throws XbbException;

    /**
     * 关联业务选择,选择业务列表
     * @param businessDataDTO 对象
     * @return 选择业务列表
     * @throws XbbException 抛出业务异常
     */
    PaasFormDataEsListVO getBusinessDataList(BusinessDataDTO businessDataDTO) throws XbbException;
    /**
     * 关联业务选择,选择产品列表
     * @param productListDataDTO 对象
     * @return 产品列表
     * @throws XbbException 抛出业务异常
     */
    PaasFormDataEsListVO getProductList(ProductListDataDTO productListDataDTO) throws XbbException;

    /**
     * 关联业务选择,选择产品列表
     * @param productListDataDTO 对象
     * @return 产品列表
     * @throws XbbException 抛出业务异常
     */
    PaasFormDataEsListVO getProductListSuper(ProductListDataDTO productListDataDTO) throws XbbException;

    /**
     * 合同关联产品业务选择,选择产品列表
     * @param productListDataDTO 对象
     * @return 产品列表
     * @throws XbbException 抛出业务异常
     */
    PaasFormDataEsListVO getRefundProductlist(ProductListDataDTO productListDataDTO) throws XbbException;

    /**
     * 根据红冲合同获取已经出库的产品
     * @param corpid 公司ID
     * @param contractId 合同ID
     * @return 剩余产品
     * @throws XbbException 抛出业务异常
     * @author youli.chen
     */
    Map<Long, Double> getRedProduct(String corpid, Long contractId) throws XbbException;

    /**
     * 获取saas详情框架
     * @param formDataDetailDTO 对象
     * @return 详情框架
     * @throws XbbException 抛出业务异常
     */
    FormDataDetailVO getDetail(FormDataDetailDTO formDataDetailDTO) throws XbbException;


    /**
     * Description: 获取saas详情框架（mobile端单纯用于工单）
     * @param mobileFormDataDetailDTO
     * @return 详情框架
     * @throws XbbException
     * @author 刘阳
     * @date 2019/5/6 3:10 PM
     * @since v1.0
     */
    MobileFormDataDetailVO getWorkOrderMoblieDetail(MobileFormDataDetailDTO mobileFormDataDetailDTO) throws XbbException;


    /**
     * 根据业务规则删除数据
     * @param deleteFormDataByBusinessRuleDTO
     * @throws XbbException
     * @return
     */
    DeleteFormDataByBusinessRuleVO deleteFormDataByBusinessRule(DeleteFormDataByBusinessRuleDTO deleteFormDataByBusinessRuleDTO) throws XbbException;

    /**
     * 获取列表页信息
     * @param dataInfoDTO 对象
     * @return 列表页通用信息
     * @throws XbbException 抛出业务异常
     */
    DataInfoVO dataInfo(DataInfoDTO dataInfoDTO) throws XbbException;

    /**
     * 客户列表查重渲染
     * @param customerRepeatDTO
     * @return
     */
    CustomerRepeatVO customerRepeat(CustomerRepeatDTO customerRepeatDTO) throws XbbException;

    /**
     * 客户和联系人查重渲染
     * @param customerRepeatDTO
     * @return
     */
    RecheckRepeatVO getRepeatMenu(CustomerRepeatDTO customerRepeatDTO) throws XbbException;

    /**
     * 批量添加联系人
     *
     * @param validateDataDTOS 入参
     * @throws XbbException 业务异常
     */
    void batchAddContact(List<ValidateDataDTO> validateDataDTOS, Long customerId, String name,  UserVO userVO,String attr, XbbRefTypeEnum xbbRefTypeEnum) throws XbbException;

    /**
     * 批量编辑联系人
     *
     * @param needAddValidateDataDTO 需要新建的联系人
     * @param needUpdateValidateDataDTO 需要更新的联系人
     * @param needDelValidateDataDTO 需要删除的联系人
     * @param customerId 客户id
     * @param processCreatorId
     * @param isFromProcess
     * @throws XbbException 业务异常
     */
    void batchEditContact(String corpid, List<ValidateDataDTO> needAddValidateDataDTO, List<ValidateDataDTO> needUpdateValidateDataDTO, List<ValidateDataDTO> needDelValidateDataDTO, Long customerId, String name, UserVO userVO, String attr, XbbRefTypeEnum xbbRefTypeEnum, String processCreatorId, Integer isFromProcess) throws XbbException;

    /**
     * 批量保存
     * @param formDataSaveDTO
     * @return
     */
    FormDataAddVO addBatch(FormDataAddDTO formDataSaveDTO) throws XbbException;

    /**
     * 获取ES列表数据
     *
     * @param esDataDTO 查询参数
     * @author GuoJun.HU
     * @since V1.0
     * @return PaasFormDataEsListVO
     * @date 2019/4/12 9:58
     */
    PaasFormDataEsListVO getEsDataList(EsDataDTO esDataDTO) throws XbbException;

    /**
     * saas特殊列表页处理
     * 有列表无表单设计入口
     *
     * @param explainList     字段解释
     * @param formDataListDTO 参数
     * @author long.rao
     * @date 2019-05-07 11:32
     */
    void handelSaasSpecialList(List<FieldAttrEntity> explainList, FormDataListDTO formDataListDTO);


    DefaultOwnerAndCoUserGetVO getDefaultOwnerAndCoUser(DefaultOwnerAndCoUserGetDTO defaultOwnerAndCoUserGetDTO) throws XbbException;

    InheritRuleVO getInheritRule(InheritRuleDTO inheritRuleDTO) throws XbbException;
    /**
     * 选择完关联业务后带上赋予一些默认的值
     *
     * @param defaultDataDTO     字段解释
     * @throws XbbException 业务异常
     * @author long.rao
     * @date 2019-08-26 14:27
     */
    DefaultDataVO getDafaultData(DefaultDataDTO defaultDataDTO) throws XbbException;

    /**
     * 选择客户带出客户联系人电话
     *
     * @param bussinessCustomerListRelyDTO
     * @return
     * @throws XbbException
     */
    BusinessCustomerListRelyVO businessCusomerListGetRely(BussinessCustomerListRelyDTO bussinessCustomerListRelyDTO) throws XbbException;

    /**
     * 产品筛选选择弹框
     * @param productListDataDTO
     * @return
     */
    PaasFormDataEsListVO getProductSearchList(ProductListDataDTO productListDataDTO) throws XbbException;

    /**
     * 采购合同筛选选择弹框
     * @param productListDataDTO
     * @return
     */
    PaasFormDataEsListVO getPurchaseSearchList(ProductListDataDTO productListDataDTO) throws XbbException;

    /**
     * 查询客户名称和电话判重设置
     *
     * @param corpid
     * @param formId
     * @param explainList 解释字段
     * @author xingxing.xiao
     * @date 2019/11/12 20:08
     */
    void handlerCustomerRepeat(String corpid, Long formId, List<FieldAttrEntity> explainList, Integer businessType);

    /**
     * 获取经销商档案中收货地址
     */
    DistributorAddressVo getDistributorAddress(DistributorAddressDTO distributorAddressDTO) throws XbbException;

    /**
     * 获取寄件人
     * @param distributorReceiverDTO
     * @return
     * @throws XbbException
     */
    DistributorReceiverVo getDistributorReceiver(DistributorReceiverDTO distributorReceiverDTO) throws XbbException;

    /**
     * Description: 批量更新负责人
     * @param handoverDTO
     * @author 刘阳
     * @date 2020/1/16 1:55 PM
     * @since v1.0
     */
    void updateOwner(HandoverDTO handoverDTO) throws XbbException;

    WarehouseListVO checkWarehouse(WarehouseCheckDTO warehouseCheckDTO) throws XbbException;
    /**
     * 开启严控后流水号生成
     * @param formDataSaveDTO
     * @param corpid
     * @param businessType
     * @param explainMap
     * @return
     * @throws XbbException
     */
    PaasFormDataEntity setSerialNo(FormDataAddDTO formDataSaveDTO, String corpid, Integer businessType, Map<String, FieldAttrEntity> explainMap) throws XbbException;

    /**
     * 获取合并客户数据
     * @param formDataListDTO
     * @return
     * @throws XbbException
     */
    CustomerMergeVO getCustomerMerge(FormDataListDTO formDataListDTO) throws XbbException;

    /**
     * 应收款核销保存
     * @param paymentWriteOffDTO
     * @return com.xbongbong.pro.payment.pojo.vo.PaymentWriteOffVO
     * @throws XbbException
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    PaymentWriteOffVO paymentWriteOff(PaymentWriteOffDTO paymentWriteOffDTO) throws XbbException;

    /**
     * 查重工具获取查重参数
     * @param repeatToolFieldGetDTO
     * @return
     * @throws XbbException
     */
    RepeatFieldListVO getRepeatField(RepeatToolFieldGetDTO repeatToolFieldGetDTO) throws XbbException;

    /**
     * 根据采购合同产品关联表数据，查询采购合同数据
     * @param
     * @throws XbbException
     * @author jiping.yang
     * @version v1.0
     */
    PaasFormDataEsListVO purchaseIdListByEs(FormDataListDTO formDataListDTO,List<PurchaseProductEntity> purchaseProductEntity,Map<String, Object> param) throws XbbException;

    /**
     * 根据合同产品关联表数据，查询合同数据
     * @param
     * @throws XbbException
     * @author sicheng.ruan
     * @version v1.0
     */
    PaasFormDataEsListVO productViewListByEs(FormDataListDTO formDataListDTO) throws XbbException;

    /**
     * 查询某个模版所有合同数据
     * @param
     * @throws XbbException
     * @author sicheng.ruan
     * @version v1.0
     */
    List<Long> getContractsByEs(FormDataListDTO formDataListDTO)  throws XbbException;

    /**
     * 待采购库存查询
     **/
    WaitPurchaseDetailVO productStockSearch(OrderOnPinDTO orderOnPinDTO) throws XbbException;


    WaitPurchaseConfiglVO getWaitPurchaseConfig(BaseDTO baseDTO) throws XbbException;

    /**
     * 合同订单筛选选择弹框
     * @param productListDataDTO
     * @return
     */
    PaasFormDataEsListVO getContractSearchlist(ProductListDataDTO productListDataDTO) throws XbbException;

    /***
     * 联系人查询
     *
     * @param contactSearchListDTO 入参
     * @throws
     * @return com.xbongbong.paas.pojo.vo.PaasFormDataEsListVO
     * @author hongxiao
     * @date 2021-11-26 15:02
     * @since
     * @version
     */
    PaasFormDataEsListVO getContactSearchList(ContactSearchListDTO contactSearchListDTO) throws XbbException;

    /**
     * paas表单工作流操作
     *
     * @param saasFormSaveDTO
     */
    void afterSaveForWorkflow(SaasFormSaveDTO saasFormSaveDTO) throws XbbException;

    /**
     * paas表单保存之后的操作
     *
     * @param saasFormSaveDTO
     * @return
     */
    AfterSavePojo afterSave(SaasFormSaveDTO saasFormSaveDTO) throws XbbException;

    CheckDateVO checkDate(CheckDateDTO checkDateDTO) throws XbbException;

    CheckDateVO deleteCheckDate(CheckDateDTO checkDateDTO) throws XbbException;

    void afterSaveForUpdateWorkflow(SaasFormSaveDTO saasFormSaveDTO) throws XbbException;

    /**
     * 资金调拨单 - 校验调拨日期
     * @param checkTransferDateDTO 前端传参
     * @return
     * @throws XbbException
     */
    CheckTransferDateVO checkTransferDate(CheckTransferDateDTO checkTransferDateDTO) throws XbbException;
}
